package Terminal.View;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

import Terminal.View.Gestori.GestoreInterfaccia;
import Terminal.View.Gestori.GestoreTask;

public class JBottoniSottoprogetto extends JPanel {
	private JButton tasksbutton;
	private GestoreTask mediator = GestoreTask.istanza();
	
	public JBottoniSottoprogetto() {
		super();
		createComponents();
	}

	private void createComponents() {
		this.setBounds(20, 601, 1280, 80);
		this.setLayout(null);
		setTimerecors();
		//this.setBackground(Color.WHITE);
		add(tasksbutton);
		setVisible(true);
		
	}
	
	private void setTimerecors() {
		tasksbutton = new JButton("Tasks");
		tasksbutton.setBounds(1130,15,150,50);//1080,20 , 200, 50);
		//timerecords.setFont(new Font( timerecords.getFont().getName(), Font.PLAIN, 16 ));
		
		tasksbutton.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				mediator.smista("GestireTask", "VisualizzaTask");
				
			}
		});
		
		
	}
	
	public void setDisabilitaBottoni(boolean bool){
		tasksbutton.setEnabled(bool);
		
	}
 
}
